package com.example.victory.swagger.model;

import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;

/**
 * 返回对象
 */
@ApiModel(description = "返回对象")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-04-26T10:50:39.083+08:00")

public class ServiceEventPage   {
  @JsonProperty("happenDate")
  private String happenDate = null;

  @JsonProperty("detail")
  @Valid
  private List<ServiceEvent> detail = null;

  public ServiceEventPage happenDate(String happenDate) {
    this.happenDate = happenDate;
    return this;
  }

  /**
   * 发生日期
   * @return happenDate
  **/
  @ApiModelProperty(example = "20170516", value = "发生日期")


  public String getHappenDate() {
    return happenDate;
  }

  public void setHappenDate(String happenDate) {
    this.happenDate = happenDate;
  }

  public ServiceEventPage detail(List<ServiceEvent> detail) {
    this.detail = detail;
    return this;
  }

  public ServiceEventPage addDetailItem(ServiceEvent detailItem) {
    if (this.detail == null) {
      this.detail = new ArrayList<ServiceEvent>();
    }
    this.detail.add(detailItem);
    return this;
  }

  /**
   * kpm
   * @return detail
  **/
  @ApiModelProperty(value = "kpm")

  @Valid

  public List<ServiceEvent> getDetail() {
    return detail;
  }

  public void setDetail(List<ServiceEvent> detail) {
    this.detail = detail;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ServiceEventPage serviceEventPage = (ServiceEventPage) o;
    return Objects.equals(this.happenDate, serviceEventPage.happenDate) &&
        Objects.equals(this.detail, serviceEventPage.detail);
  }

  @Override
  public int hashCode() {
    return Objects.hash(happenDate, detail);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ServiceEventPage {\n");
    
    sb.append("    happenDate: ").append(toIndentedString(happenDate)).append("\n");
    sb.append("    detail: ").append(toIndentedString(detail)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

